package com.by.bean;

import com.by.common.group.ISave;
import com.by.common.group.IUpdate;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Data
@ApiModel("员工")
public class Employee {

    @NotNull(message = "员工id不能为空", groups = {IUpdate.class})
    @ApiModelProperty("员工 id,修改时不能为空！")
    int id;


    @Valid
    User user;

    @ApiModelProperty(hidden = true)
    int userId;

    @NotEmpty(message = "员工名称不能为空", groups = {ISave.class, IUpdate.class})
    @ApiModelProperty(value = "员工名称", required = true)
    String name;
    String mobile;
    int deptId;
    String job;
    double salary;
    String birthday;
    String entryDate;
    int roleId;
    int type;
    int pp;
    double performance;
    double hasFininsh;


}
